Updating project Makefiles (excluding Java)

The SNiFF+ Make Support has been modified and is no longer compatible with the Project Makefiles of earlier versions so you will need to update the Makefiles. To do so:

| Note
| For upgrading Java projects, see page 19.

In the SiteMenus.sniff file
The

SiteMenus.sniff file is in the SNIFF_DIR/config/ directory.

- Open

SiteMenus.sniff in an editor.
- Under the
# Patch Makefiles for New MakeSupport line, uncomment the following lines:
# >Makefiles
# shell "Update Makefile(s) for New Makesupport" "echo Updating File %f; sh $SNIFF_DIR/make_support/ UpdateMakefile.sh %f"
or
In the UserMenus.sniff file
The UserMenus.sniff file is in the % SNIFF_DIR%\Profiles\< Username >\ directory on Windows, and in your $HOME/.sniffrc/ directory on Unix.

- Open

UserMenus.sniff in an editor.
- Copy the following lines from
SiteMenus.sniff to UserMenus.sniff :
#Patch Makefiles for New MakeSupport
#>Makefiles
# shell "Update Makefile(s) for New Makesupport" "echo Updating File %f; sh $SNIFF_DIR/make_support/ UpdateMakefile.sh %f"
- In
UserMenus.sniff , under the # Patch Makefiles for New MakeSupport line, uncomment the following lines:
# >Makefiles
# shell "Update Makefile(s) for New Makesupport" "echo Updating File %f; sh $SNIFF_DIR/make_support/ UpdateMakefile.sh %f"
In the Project Editor

Load the project created with an earlier SNiFF+ version.

2. In the Filter dialog, File Types view, make sure that Makefiles are selected.

3. In the File List, select all Makefiles.

4. If the Makefiles are read-only, check them out by choosing File > Check Out.

5. Choose Makefiles > Update Makefiles for New Makesupport.
   This command runs a script which removes the following lines from the selected Makefiles:

include $(SNIFF_MAKEDIR)/$(SNIFF_VPATH_INCL)
include $(SNIFF_MAKEDIR)/$(SNIFF_OFILES_INCL)
It is necessary to remove these lines since the vpath.incl and ofiles.incl files are no longer generated by the new Make Support, so trying to include them would result in an error. The VPATH macro is not used in the new make support because of its limitations:
Limitations of VPATH :

- not all compilers support the

inhibit local includes flag
- inconsistencies because dependencies may be incorrectly resolved
- builds take longer
  Advantages of
VPATH :

VPATH can search multiple directories for dependencies and source files
Using Native Make (Unix only)
The following information is only relevant for you if you want to use SNiFF+'s Make support system together with native Make on the following platforms:
AIX 4.2 or newer
HP-UX 10.20 or newer
Irix 5.3 or newer
Sinix 5.42 or newer
Some features used in the standard set of Make Support files do not work correctly with native Make on these platforms. We therefore supply a separate set of Make Support files in this directory that must be used together with native Make.
Please note that the following will only work with the platforms mentioned above on condition that your source files are located in the same directory where make is called. Thus make sure that the Directory field is left blank for files of type implementation. You can find this field in SNiFF+'s Preferences and Project Attributes > File Types view > General tab.
To apply these native Make Support files, do the following:

- In your

SNiFF_DIR/make_support directory, rename your standard .mk file e.g.,
general.c.mk to general_orig.c.mk.
- Then rename your native
.mk file in the same directory to your standard .mk file e.g.,
general.c.native.mk to general.c.mk.

| Note to users of native Make on DEC OSF1:
| SNiFF+ does not currently support native Make on DEC OSF1. We recommend using the GNU Make supplied with SNiFF+ instead.

| Note to users of native Make on SCO Unixware:
| SNiFF+ does not currently support native Make on SCO Unixware. Native Make does not work with both standard and native Make Support files since the VPATH macro is not expanded correctly.

| Note to users of native Make on RS6000 and HP-UX:
| In your SNiFF_DIR/make_support directory, rename the general.link.native.mk file to general.link.native.orig.mk. Then rename the general.link.native.mk file in the same directory to general.link.mk.